public class demo8 {
    public static void main(String[] args) {
        int[] arry1 = {7,4,8,20,9,11,4,2,15,10,19};
        int max = arrymax(arry1);
        System.out.println("数组中最大的数为：" + max);
    }

    public static int arrymax(int[] arry){
        int max = arry [0];
        for (int i = 1; i < arry.length; i++) {
            if(max < arry[i]){
                max = arry[i];
            }
        }
        return max;
    }
}
